<?php

/**
 * Subclass for representing a row from the 't_question' table.
 *
 * 
 *
 * @package lib.model.quiz
 */ 
class Question extends BaseQuestion
{
  public function retrieveAlternativesByQuestionId($question_id)
  {
  	$c2 = new Criteria();
  	$c2->addJoin(AlternativePeer::ID,QuestionAlternativePeer::ID_ALTERNATIVE, CRITERIA::INNER_JOIN);
  	$c2->addJoin(QuestionAlternativePeer::ID_QUESTION, QuestionPeer::ID,    CRITERIA::INNER_JOIN);
  	$c2->add(QuestionPeer::ID,$question_id);
  	return AlternativePeer::doSelect($c2);
  }
  
  public function __toString()
  {
  	return $this->getName();
  }
  
	
}
